#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>

int map[1025][1025] = { 0 };
int main()
{
	int x, y, n, dose;
	scanf("%d", &n);
	x = y = pow(2, n);
	int x1 = x, y1 = y;
	int a = 1, b = 1;
	dose = x1 / 2;
	for (; x1 / 2 != 0; x1 = dose, y1 = dose,dose/=2) {
		for (int q=2*dose; q <= x; q += 2 * dose,x1 += 2 * dose,y1=2*dose) {
			for (int p = 2 * dose; p <= y; p += 2 * dose, y1 += 2*dose) {
				for (a = x1 + 1 - 2 * dose; a <= x1 - dose; a++) {
					for (b = y1 + 1 - 2 * dose; b <= y1 - dose; b++) {
						map[a][b] = 1;
					}
				}
			}
		}
	}
	for (int i = 1; i <= x; i++) {
		for (int j = 1; j <= y; j++) {
			if (map[i][j])printf("%d ", 0);
			else printf("%d ", 1);
		}
		printf("\n");
	}
	return 0;
}